package cn.sxgan.common.entity.vo;

import cn.sxgan.common.entity.SysMenu;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serial;
import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * @Description: 角色及菜单信息
 * @Author: sxgan
 * @Date: 2024-09-24 17:40
 * @Version: 1.0
 **/
@Data
@Schema(name = "SysRoleAndMenuVO", description = "角色菜单信息视图对象")
public class SysRoleAndMenuVO implements Serializable {
    @Serial
    private static final long serialVersionUID = 1L;
    
    @Schema(description = "角色ID")
    @TableId
    private Long roleId;
    
    @Schema(description = "角色名称")
    private String roleName;
    
    @Schema(description = "角色权限字符串")
    private String roleKey;
    
    @Schema(description = "显示顺序")
    private Integer roleSort;
    
    @Schema(description = "数据范围（1：全部数据权限 2：自定数据权限 3：本部门数据权限 4：本部门及以下数据权限）")
    private String dataScope;
    
    @Schema(description = "角色状态（0正常 1停用）")
    private String status;
    
    @Schema(description = "删除标志（0代表存在 2代表删除）")
    private String delFlag;
    
    @Schema(description = "创建者")
    private String createBy;
    
    @Schema(description = "创建时间")
    private Date createTime;
    
    @Schema(description = "更新者")
    private String updateBy;
    
    @Schema(description = "更新时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME, pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;
    
    @Schema(description = "备注")
    private String remark;
    
    @Schema(description = "角色菜单信息", type = "List")
    List<SysMenu> sysMenus;
}
